package com.colin.project.controller;

import com.colin.project.service.FileService;
import com.colin.project.util.response.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;

/**
 * 文件控制层
 */
@Controller
public class FileController {

    @Autowired
    private FileService fileService;


    @RequestMapping("/file/checkFileMD5/{md5}/{flag}")
    @ResponseBody
    public ResponseResult<String> checkFileMD5(@PathVariable String md5,
                                               @PathVariable("flag") Integer flag,
                                               HttpSession session) {
        return fileService.checkFileMd5(md5, flag, session);
    }

}
